package com.cloud.business.entity.sys;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 地区架构表 实体
 * Copyright: Copyright (C) 2020 DLANGEL, Inc. All rights reserved.
 * Company: 大连安琪科技有限公司
 *
 * @author Rex
 * @since 2020-09-14 17:27:49
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(autoResultMap = true)
@ApiModel(value = "SysRegMapStruct对象", description = "地区架构表 ")
public class SysRegMapStruct implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "object_id", type = IdType.AUTO)
    @ApiModelProperty(name = "objectId", value = "base-主键")
    private Integer objectId;
    @TableLogic
    @ApiModelProperty(name = "isDeleted", value = "base-删除标志")
    private Integer isDeleted;
    @ApiModelProperty(name = "pid", value = "base-上级id")
    private Integer pid;
    @ApiModelProperty(name = "sort", value = "base-排序")
    private Integer sort;
    @ApiModelProperty(name = "createUserId", value = "base-创建人")
    private Integer createUserId;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(name = "createTime", value = "base-创建时间")
    private Date createTime;
    @ApiModelProperty(name = "modificationUserId", value = "base-修改人")
    private Integer modificationUserId;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(name = "modificationTime", value = "base-修改时间")
    private Date modificationTime;
    @ApiModelProperty(name = "regName", value = "地区名称")
    private String regName;
    /**
     * 注解的typeHandler只生效于insert和update,
     * 要生效select必须TableName.autoResultMap=true
     */
    @ApiModelProperty(name = "regCollection", value = "区域经纬度集合")
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray regCollection;
    @ApiModelProperty(name = "isEnable", value = "是否启用")
    private Integer isEnable;
    @ApiModelProperty(name = "adcode", value = "区域编码")
    private String adcode;
    @ApiModelProperty(name = "provCode", value = "所属省code")
    private String provCode;
    @ApiModelProperty(name = "cityCode", value = "所属市code")
    private String cityCode;
    @ApiModelProperty(name = "level", value = "级别")
    private String level;
}
